Learn R Programming

Compositional (version 4.3)

Tuning of the projection pursuit regression for compositional data: Tuning of the projection pursuit regression for compositional data

Description

Tuning of the projection pursuit regression for compositional data In addition, estimation of the rate of correct classification via K-fold cross-validation.

Usage

compppr.tune(y, x, nfolds = 10, folds = NULL, seed = FALSE, nterms = 1:10,
type = "alr", yb = NULL, B = 1000 )

Arguments

y

A matrix with the available compositional data, but zeros are not allowed.

x

A matrix with the continuous predictor variables.

nfolds

The number of folds to use.

folds

If you have the list with the folds supply it here.

seed

If seed is TRUE the results will always be the same.

nterms

The number of terms to try in the projection pursuit regression.

type

Either "alr" or "ilr" corresponding to the additive or the isometric log-ratio transformation respectively.

yb

If you have already transformed the data using a log-ratio transformation put it here. Othewrise leave it NULL.

B

The number of bootstrap re-samples to use for the unbiased estimation of the performance of the projection pursuit regression. If B = 1, no bootstrap is applied.

Value

A list including:

kl

The average Kullback-Leibler divergence.

bc.perf

The bootstrap bias corrected average Kullback-Leibler divergence. If no bootstrap was performed this is equal to the average Kullback-Leibler divergence.

runtime

The run time of the cross-validation procedure.

Details

The function performs tuning of the projection pursuit regression algorithm.

References

Friedman, J. H. and Stuetzle, W. (1981). Projection pursuit regression. Journal of the American Statistical Association, 76, 817-823. doi: 10.2307/2287576.

Tsamardinos I., Greasidou E. and Borboudakis G. (2018). Bootstrapping the out-of-sample predictions for efficient and accurate cross-validation. Machine Learning 107(12): 1895-1922. https://link.springer.com/article/10.1007/s10994-018-5714-4

See Also

comp.ppr, comp.reg, alfa

Examples

Run this code
# NOT RUN {
x <- as.matrix(iris[, 1:4])
x <- x/ rowSums(x)
ina <- iris[, 5]
mod <- compknn.tune(x, ina, a = seq(1, 1, by = 0.1) )
# }

Run the code above in your browser using DataLab